package com.jk.bgmainconsumer.controller;

import com.jk.bgmainconsumer.entity.GoodsEntity;
import com.jk.bgmainconsumer.entity.IndentEntity;
import com.jk.bgmainconsumer.service.IndentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 文件名称:Indentcontroller
 *
 * @Description //TODO $
 * @Date $ $
 * 作者 郭英杰
 * Copyright (c) 2021, yuxy123@gmail.com All Rights Reserved.</pre>
 */
@RestController
@RequestMapping("orders")
public class Indentcontroller {
    @Autowired
    private IndentService indentService ;
    //查询未付款
    @RequestMapping( "pandingOrders")
    public List<IndentEntity> pandingOrders(IndentEntity  indent){
        return indentService.pandingOrders(indent);
    }
    //查询全部
    @RequestMapping( "allOrders")
    public List<IndentEntity> allOrders(IndentEntity  indent){
        return indentService.allOrders(indent);
    }
    //回显
    @RequestMapping( "orderQuery")
    public IndentEntity orderQuery(String id){
        return indentService.orderQuery(id);
    }
    //查询预期的商品
    @RequestMapping("expectGoods")
    public List<GoodsEntity>expectGoods(GoodsEntity goods){
            return  indentService.expectGoods(goods);
    }
}
